home *** CD-ROM | disk | FTP | other *** search
/ MacWarehouse Macintosh Games / MacWarehouse Macintosh Games.iso / AMBER demo / ROXY / ROXY.dxr / 00859_demo handlers.ls < prev    next >
Encoding:
Text File  |  1996-10-18  |  1.0 KB  |  36 lines

  1. on allPuppetsOff
  2.   repeat with i = 1 to 48
  3.     puppetSprite(i, 0)
  4.   end repeat
  5. end
  6.  
  7. on stripLocDataCast confirmation
  8.   if confirmation <> #really then
  9.     alert("Hey, you're about to strip out ALL location-data fields for this domain. If you're SURE, type 'stripLocDataCast #really'")
  10.     exit
  11.   end if
  12.   set numCast to the number of castMembers
  13.   set reservedList to ["foreground.DATA", "inventory.DATA", "DEFAULT_LOCATION.DATA"]
  14.   set emptyCast to findEmpty(cast 1)
  15.   put "empty cast = " & emptyCast
  16.   repeat with i = 1 to numCast
  17.     set cName to the name of cast i
  18.     if cName contains ".DATA" then
  19.       if getPos(reservedList, cName) = 0 then
  20.         duplicate(cast emptyCast, cast i)
  21.       else
  22.         put "Sparing cast " & i & " (" & cName & ")"
  23.       end if
  24.       next repeat
  25.     end if
  26.     if the castType of cast i = #text then
  27.       if the text of cast i = ("saveString" & RETURN & "KILL ME") then
  28.         put "."
  29.         duplicate(cast emptyCast, cast i)
  30.       end if
  31.     end if
  32.   end repeat
  33.   put "<i> done!"
  34.   beep()
  35. end
  36.